package org.example.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.pojo.User;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserMapper {

    User selectOneUser(@Param("username")String username);

    void insertUser(User newUser);

    List<User> selectAllUsers();

    User findByUserId(@Param("id")Integer userId);

    void updatePassword(String username, String phone, String password);

    void updateStatus(Integer status, Integer flag, Integer companyId, Integer id);

    Integer selectMaxId();

    void updateUser(String phone, Integer id);

    void updateHeadImg(String headImg, Integer id);

    void upgradeUser(Integer id, int status);
}
